import axios from 'axios';
import { UserState } from '@/store/modules/user/types';

export interface PolicyRecord {
  id: string;

}
export interface LoginData {
  token: any;
  mobile: string;
  password: string;
  agent_info:any
}
export interface PolicyParams extends Partial<PolicyRecord> {
  page: number;
  limit: number;
}
export function login(data: LoginData) {
  return axios.post<LoginData>('/agent/login/login', data);
}

export function logout() {
  return axios.post('/agent/login/login_out');
}

export function getUserInfo() {
  return axios.post<UserState>('/admin/admin_info/detail');
}


